Skip to content

diff: use the traditional timestamp in context headers in the POSIX locale - #322

Open
sylvestre wants to merge 1 commit into
diff-colorfrom
diff-context-timestamp
Open

sylvestre wants to merge 1 commit into
diff-colorfrom
diff-context-timestamp

Conversation

@sylvestre

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLI • Give Feedback 💬

@sylvestre
sylvestre added this pull request to stack #328 October 24, 2026 13:02
@sylvestre
sylvestre marked this pull request as ready for review October 24, 2026 13:14
Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@sylvestre
sylvestre force-pushed the diff-context-timestamp branch from ef6e6e6 to 3576202 Compare October 24, 2026 20:13
Copilot AI balanced review requested due to automatic review settings October 24, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@sylvestre
sylvestre force-pushed the diff-context-timestamp branch from 3576202 to d0b291c Compare October 25, 2026 08:41
Copilot AI balanced review requested due to automatic review settings October 25, 2026 08:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@sylvestre
sylvestre force-pushed the diff-context-timestamp branch from d0b291c to d480f32 Compare October 25, 2026 09:09
Copilot AI balanced review requested due to automatic review settings October 25, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

…ocale

Should make test colors pass. cmp now also treats an empty LC_ALL or LANG as unset.
@sylvestre
sylvestre force-pushed the diff-context-timestamp branch from d480f32 to e6a8748 Compare November 2, 2026 08:31
Copilot AI balanced review requested due to automatic review settings November 2, 2026 08:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open issues

Review effort: Lite

Comment thread src/utils.rs
Comment on lines 75 to 76
/// Retrieves the modification time of the input file specified by file path
/// If an error occurs, it returns the current system time
Comment thread src/utils.rs
Comment on lines +315 to 319
let m_time: DateTime<Local> = get_modification_time(invalid_file, TimestampStyle::Iso)
.parse()
.unwrap();

assert!(m_time > current_time);
for (variables, timestamp) in [
(&[("LC_ALL", "C")][..], traditional),
(
&[("LC_ALL", "POSIX"), ("LC_TIME", "en_US.UTF-8")],
&[("LC_ALL", ""), ("LC_TIME", ""), ("LANG", "POSIX")],
traditional,
),
(&[("LANG", "fr_FR.UTF-8")], iso),
Comment thread src/macros.rs
@@ -1,5 +1,5 @@
// asserts equality of the actual diff and expected diff
// considering datetime varitations
// considering datetime varitations (ISO and traditional formats)
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

GNU diffutils testsuite comparison:

Test results comparison:
  Current:   TOTAL: 33 / PASSED: 12 / FAILED: 17 / SKIPPED: 4
  Reference: TOTAL: 33 / PASSED: 8 / FAILED: 21 / SKIPPED: 4

Changes from main branch:
  TOTAL: +0
  PASSED: +4
  FAILED: -4

Test improvements (4):
  + binary
  + colors
  + new-file
  + stdin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants